/**
 * 
 */
package neptune.web.client.view.components;

import neptune.web.client.commands.DeleteExperimentCommand;
import neptune.web.client.commands.DeleteUserCommand;
import neptune.web.client.commands.ExperimentSummaryCommand;
import neptune.web.client.commands.HelpCommand;
import neptune.web.client.commands.LogOutCommand;
import neptune.web.client.commands.NewExperimentCommand;
import neptune.web.client.commands.NewUserCommand;
import neptune.web.client.commands.OpenClusterViewCommand;
import neptune.web.client.commands.OpenPreferencesDialog;
import neptune.web.client.commands.OpenTaskViewCommand;
import neptune.web.client.commands.OpenTemplatesSummaryViewCommand;
import neptune.web.client.commands.UserSummaryCommand;

import com.google.gwt.user.client.ui.MenuBar;

/**
 * @author Roberto Bifulco [info@robertobifulco.it, robertobifulco.it]
 * 
 */
public class AdminMenuBar extends MenuBar {

	public AdminMenuBar() {

		MenuBar experiments = new MenuBar(true);
		experiments.addItem("Summary", new ExperimentSummaryCommand());
		experiments.addItem("New...", new NewExperimentCommand());
		experiments.addItem("Remove...", new DeleteExperimentCommand());

		MenuBar users = new MenuBar(true);
		users.addItem("Summary", new UserSummaryCommand());
		users.addItem("New...", new NewUserCommand());
		users.addItem("Remove...", new DeleteUserCommand());
		users.addItem("LogOut", new LogOutCommand());

		MenuBar system = new MenuBar(true);
		system.addItem("Cluster", new OpenClusterViewCommand());
		system.addItem("Jobs", new OpenTaskViewCommand() );
		system.addItem("Topology Templates", new OpenTemplatesSummaryViewCommand() );
		system.addItem("Preferences", new OpenPreferencesDialog() );
		
		addItem("Users", users);
		addItem("Experiments", experiments);
		addItem("System", system);
		addItem("Help", new HelpCommand());
		addSeparator();
		
		addStyleName("OperativeView-gwt-MenuBar-horizontal");
	}

}
